package com.kehutong.material.service;

import com.kehutong.material.entity.WelCome;
import org.coraframework.json.JSONObject;
import org.coraframework.orm.jdbc.Page;

import java.io.IOException;

/**
 * 欢迎语服务
 * 
 * @author liuzhen (liuxing521a@163.com)
 * @createTime 2020年6月4日下午2:11:05
 */
public interface WelcomeService {
	
	/**
	 * 返回默认欢迎语
	 * @return
	 */
	public WelCome getDefault();
	
	/**
	 * 设为默认欢迎语
	 * @param id
	 * @return
	 */
	public Object setDefault(String id);

	/**
	 * 列出所有欢迎语
	 * @param jsonObject
	 * @return
	 * @throws IOException
	 */
	public Page<WelCome> list(JSONObject jsonObject) throws IOException;

	/**
	 * 根据id获取欢迎语
	 * @param id
	 * @return
	 */
	public WelCome get(String id);
	
	/**
	 * 保存欢迎语
	 * @param welcome
	 * @param rs
	 * @return
	 * @throws IOException
	 */
	public Object save(WelCome welcome, JSONObject jsonObject) throws IOException;

	/**
	 * 修改欢迎语
	 * @param chatRoom
	 * @param rs
	 * @return
	 * @throws IOException
	 */
	public Object update(WelCome welcome, JSONObject jsonObject) throws IOException;
	
	/**
	 * 删除欢迎语
	 * @param id
	 * @return
	 * @throws IOException
	 */
	public Object delete(String id) throws IOException;
}
